<?php
namespace app\admin\controller;

use think\Request;

use app\model\User as UserModel;

class User extends Common
{
	public function lis(){
		$lis = UserModel::order('is_admin desc')->order('id desc')->paginate(4);
		// dump($lis);
		// 让前端显示数据
		$this->assign('lis',$lis);
		return $this->fetch();
	}
	public function add(){
		// Request::instance()->post();  
		// input('post.'); 助手函数
		$data = input('post.'); 
		//将接收到的数据传递到数据库中
		$res = (new UserModel())->add($data);
		return $res;
	}
}